home *** CD-ROM | disk | FTP | other *** search
/ Softdisk for Windows 42 / Softdisk for Windows 42.iso / QUARRY / QUARRY.EXE / QUARRY.dxr / 00023_MOVEBLUE.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  667 b   |  28 lines

  1. on MOVEBLUE
  2.   global GRIDY, GRIDV, GRID, MV, GN, done, STARTED, REDSCORE, BLUESCORE, GAMELEN
  3.   set done to 0
  4.   repeat while done = 0
  5.     set MV to 0
  6.     repeat while MV = 0
  7.       set MV to 0
  8.       repeat with N = 1 to 140
  9.         if getAt(GRIDV, N) = 2 then
  10.           set GN to N
  11.           CHECKBLUEMOVE()
  12.         end if
  13.       end repeat
  14.       if MV = 0 then
  15.         set MV to 1
  16.       end if
  17.       if ((REDSCORE - 2) > GAMELEN) or ((BLUESCORE - 2) > GAMELEN) then
  18.         set MV to 1
  19.       end if
  20.     end repeat
  21.     CHECKALLMOVEBLUE()
  22.     if ((REDSCORE - 2) > GAMELEN) or ((BLUESCORE - 2) > GAMELEN) then
  23.       set done to 1
  24.     end if
  25.   end repeat
  26.   SHIFTHEAD()
  27. end
  28.